/* 关灯问题 */

#include<iostream>
#include<algorithm>
using namespace std;

int main(void)
{
	bool flag[101] = {false};

	for (int i = 2; i < 101; i++)
	{
		for (int j = i; j < 101; j += i)
		{
			flag[j] = !flag[j];
		}
	}

	for (int i = 1; i < 100; i++)
	{
		if (!flag[i])
		{
			cout<< i << " ";
		}
	}
	cout<<endl;

	return 0;
}
